package com.eastmoney.emis.edda.task.eddi.processor;

import com.eastmoney.emis.edda.task.eddi.EddiTask;

/**
 * @description: APPLY -> BANK_PROCESS-> BANK_PROCESS_SUCCESS -> FUND_DEPOSIT -> FUND_DEPOSIT_RETRY -> 人工介入
 * @projectName: EDDA-HSBC
 * @package: com.eastmoney.emis.edda.task.eddi
 * @author: 汪程程
 * @date: 2022/10/13 2:27 PM
 * @version: 1.0
 */
public interface EddiProcessor {

    boolean canProcess(String status);

    void execute(EddiTask task);

    default void process(EddiTask task) {
        if(!canProcess(task.getEddiInstruction().getStatus())) {
            return;
        }
        execute(task);
    }
}
